#%RAML 1.0

    title: Party API
    baseUri: http://localhost:8081
    version: v1
    
    documentation:
      - title: mod-party API
        content: This documents the API calls that can be made to post party for users, and to get them
    
    types:
      partyData: !include partyData.json
      partyDataCollection: !include partyDataCollection.json
      errors: !include raml-util/schemas/errors.schema
    
    traits:
      validate: !include raml-util/traits/validation.raml
      language: !include raml-util/traits/language.raml
      pageable:  !include raml-util/traits/pageable.raml
      searchable: !include raml-util/traits/searchable.raml
    
    resourceTypes:
      collection: !include raml-util/rtypes/collection.raml
      collection-item: !include raml-util/rtypes/item-collection.raml
    
    /party/data:
      displayName: partyData
      description: 获取活动的统计数据,以便进行分析
      type:
        collection:
          schemaCollection: partyDataCollection
          schemaItem: partyData
          exampleCollection: !include examples/partyDataCollection.sample
          exampleItem: !include examples/partyData.sample
    
      post:
        is: [validate]

      get:
        is: [
          searchable: {description: "根据查询条件返回一些活动的统计数据", example: "query=( propertyName = *  and name  = *  )"},
          pageable,
          validate
        ]

      /export_excel:
             get:
              description: "excel下载"
              is: [
                        searchable: {description: "根据查询条件导出一些活动的统计数据", example: "query=( propertyName = *  and name  = *  )"},
                        pageable,
                        validate
                      ]
              responses:
                200:
                  description: "下载文件成功"
                  body:
                    application/octet-stream:
                400:
                  description: "Bad request"
                  body:
                    text/plain:
                      example: "Bad request"
                500:
                  description: "Internal server error"
                  body:
                    text/plain:
                      example: "Internal server error"
